package com.qdxwx.data.service.book;

import com.qdxwx.common.page.PageRequest;
import com.qdxwx.models.book.Book;
import com.qdxwx.models.book.BookQuery;

import java.util.List;

/**
 * Qdx NetSchool Platform
 * @author qdxwx
 * @updateTime 2022/5/25
 * @description
 */
public interface BookService {

    int insert(Book book);

    Book get(int id);

    List<Book> getList(BookQuery book, PageRequest page);

    List<Book> getListByTeacherId(int teacherId, PageRequest page);

    int countByTeacherId(int teacherId);

    int count(BookQuery book);

    int update(Book book);

    int deleteById(int id);

    //浏览数 +1
    int updateView(int id);

    //购买数 +1
    int updateBuy(int id);

}
